import { Toast, ImagePreview   } from "vant";
import cTitle from "components/title";

export default {
  data() {
    return {
        items: [
            // {
            //     goods: {
            //         thumb: 'https://shops.cg500.com/static/upload/images/63/2024/05/8f9fdcadc184f551f913e8dabcb1c11a.jpg',
            //         title: '111企业重点人群补贴'
            //     },
            //     price: 10000,
            //     img: 'https://shops.cg500.com/static/upload/images/63/2024/05/8f9fdcadc184f551f913e8dabcb1c11a.jpg',
            //     status: 0
            // },
            // {
            //     goods: {
            //         thumb: 'https://shops.cg500.com/static/upload/images/63/2024/05/8f9fdcadc184f551f913e8dabcb1c11a.jpg',
            //         title: '222企业重点人群补贴企业重点人群补贴企业重点人群补贴企业重点人群补贴'
            //     },
            //     price: 20000,
            //     img: 'https://shops.cg500.com/static/news-icon.png',
            //     status: 1
            // }
        ],
        tabList: [
            { title: "未支付", index: "0", },
            { title: "已支付", index: "1", },
        ],
        tabsId: 0,
        goods_id: ''
    };
  },

  components: {
    cTitle
  },
  activated() {
    console.log(this.$route.query,this.$route.params,'参数')
    this.goods_id = this.$route.params.id;
    this.getData();
  },
  computed: {
   
  },
  methods: {
    previewImage(img){
        ImagePreview({
            images: [img],
            startPosition: 0,
        })
    },
    getData(){
        $http.get("ZhengChengYc.gaijia_list", {
            uid: localStorage.getItem("uid"),
            page: 1,
            status: this.tabsId,//0未支付 1已支付
            goods_id: this.goods_id
          }, "加载中").then((res) => {
            if (res.result == 1) {
              console.log(res,'gaijia_list')
             this.items = res.data.data;
            }
          });
         
    },
    tabsOn(index) {
        this.tabsId = index;
        this.getData();
    },
    
  }
};